package com.y3k.utils;

import java.io.File;

import org.apache.log4j.Logger;

public class FileUtil {

	public static final Logger log = Logger.getLogger(FileUtil.class);

	public static void deleteFromDirectory(String exportedFilePath, String contains) {
		File f = new File(exportedFilePath);

		File[] files = f.listFiles();

		for (int i = 0; i < files.length; i++) {
			File file = files[i];
			if (file.getName().contains(contains)) {
				log.info("Archivo " + file.getName() + " borrado");
				file.delete();
			}
		}
	}
}
